package agenceVoyageVirtuel.client.viewer;

import agenceVoyageVirtuel.client.beans.VoyageData;

import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.DisclosurePanel;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.IntegerBox;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.ScrollPanel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.datepicker.client.DatePicker;

public class DetailVoyageViewer extends Composite {

	private final VoyageData voyageData;

	public DetailVoyageViewer(VoyageData voyageData) {
		this.voyageData = voyageData;
		VerticalPanel verticalPanel = new VerticalPanel();
		initWidget(verticalPanel);
		Label destination = new Label("Destination: "+voyageData.getDestination());
		verticalPanel.add(destination);
		Image image = new Image("images/"+voyageData.getNomImage());
		image.setPixelSize(200, 150);
		verticalPanel.add(image);
		VerticalPanel hp = new VerticalPanel();
		IntegerBox ib = new IntegerBox();
		ib.setMaxLength(2);
		hp.add(new Label("Dur\u00E9e :"));
		hp.add(ib);
		hp.add(new Label("jours"));
		verticalPanel.add(hp);
		Label tarif = new Label("Tarif \u00E0 la journ\u00E9e: " + voyageData.getTarifQuotidien());
		verticalPanel.add(tarif);
	}

	public VoyageData getVoyageData() {
		return voyageData;
	}

}
